/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate.qtags;

import org.xdoclet.plugin.hibernate.qtags.parameter.Access;
import org.xdoclet.plugin.hibernate.qtags.parameter.Column;
import org.xdoclet.plugin.hibernate.qtags.parameter.Generated;
import org.xdoclet.plugin.hibernate.qtags.parameter.Node;

/**
 * Declares a timestamp property.  The optional &lt;timestamp&gt; element indicates that the table contains
 * timestamped data. This is intended as an alternative to versioning. Timestamps are by nature a less safe
 * implementation of optimistic locking. However, sometimes the application might use the timestamps in other ways.
 *
 * @qtags.location field
 * @qtags.location method
 * @qtags.once
 */
public interface HibernateTimestampTag extends com.thoughtworks.qdox.model.DocletTag, Column, Node, Access, Generated {
    /**
     * A version property value that indicates that an instance is newly instantiated (unsaved), distinguishing
     * it from detached instances that were saved or loaded in a previous session. (undefined specifies that the
     * identifier property value should be used.)
     *
     * @qtags.allowed-value null
     * @qtags.allowed-value undefined
     * @qtags.default null
     */
    String getUnsavedValue();
    /**
     * defines source of timestamped data - whether this is generated in database
     * or in jvm.  
     * @qtags.allowed-value vm
     * @qtags.allowed-value db
     * @return
     */
    String getSource();
}